package Service;

import Entity.Workorder;
import java.util.List;

public interface WorkorderService {
    boolean save(Workorder workorder);
    boolean delete(Integer id);
    boolean update(Workorder workorder);
    Workorder getById(Integer id);
    List<Workorder> getAll();
    List<Workorder> getByCustomerId(Integer customerId);
    List<Workorder> getByBusinessId(Integer businessId);
    List<Workorder> getByCreatorId(Integer creatorId);
    List<Workorder> getByHandlerId(Integer handlerId);
    List<Workorder> getByStatus(Integer status);
    List<Workorder> getRecentOrders(Integer days);
    boolean assignHandler(Integer workorderId, Integer handlerId);
    boolean changeStatus(Integer workorderId, Integer newStatus);
}